<% if @updated %>
  <%= turbo_stream.replace @time_entry, partial: "time_entries/time_entry", locals: { time_entry: @time_entry } %>
  <%= turbo_stream.update 'time_entry_form', "" %>
  <%= turbo_stream_update_daily_time(@time_entry.reference_date, @total_logged_time)%>

  <%= new_turbo_stream_alert_message(:notice, t_flash_message(@time_entry)) %>

<% else %>
  <%= new_turbo_stream_alert_message(:alert, @time_entry.errors.full_messages.to_sentence) %>
<% end %>